﻿// -------------------------------------------------------------------------
//    @FileName         :    NFEventLogPart.h
//    @Author           :    gaoyi
//    @Date             :    2025/1/7
//    @Email            :    445267987@qq.com
//    @Module           :    NFEventLogPart
//
// -------------------------------------------------------------------------

#pragma once

#include <NFComm/NFShmStl/NFShmHashMap.h>
#include <NFLogicCommon/NFLogicShmTypeDefines.h>
#include "NFPart.h"
#include "proto_common_eventlog.nanopb.h"

const int MAX_EVENT_LOG_NUM = 20;

class NFEventLogPart : public NF_OBJECT_TEMPLATE_MACRO(NFEventLogPart, EOT_LOGIC_PART_MIN_ID + PART_EVENTLOG, NFPart)
public:
    NFEventLogPart();
    
    ~NFEventLogPart() override;
    
    int CreateInit();
    int ResumeInit();
private:
    NFShmHashMap<uint64_t, tbEventLog, MAX_EVENT_LOG_NUM> m_astEventLog;
};